package PolymorphismInstanceof.PolymorphismInstanceofExercise.PolymorphismInstanceofExerciseThree;

public class MyRectangle extends GeometricObject{

    private double width;
    private double height;

    public MyRectangle(double width, double height,String color, double weight){
        super(color,weight);
        this.width = width;
        this.height =height;
    }

    public void setWidth(double width) {
        this.width = width;
    }

    @Override
    public double getWeight() {
        return this.getWeight();
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public double getHeight() {
        return height;
    }

    @Override
    public double findArea() {
        return weight * height;
    }
}
